import MgToolbar from './src/components/navigator/mg-toolbar'
import MgTabs from './src/components/navigator/mg-tabs'
import MgContextMenu from './src/components/navigator/mg-context-menu'
import MgModal from './src/components/popups/mg-modal'
import MgDialog from './src/components/popups/mg-dialog'
import MgTable from './src/components/group/mg-table'
import MgDatetime from './src/components/tools/mgDatetime'
import MgSelectTree from './src/components/group/mg-select-tree'
import MgEasyTable from './src/components/group/mg-easy-table'

import store from './src/js/store'
import httpJs from './src/js/httpJs'

const components = [
    MgToolbar,
    MgTabs,
    MgContextMenu,
    MgModal,
    MgDialog,
    MgTable,
    MgDatetime,
    MgSelectTree,
    MgEasyTable
]

const install = function (Vue) {
    components.forEach(function (component) {
        Vue.component(component.name, component)
    })
}

export {
    install as default,
    MgToolbar,
    MgTabs,
    MgContextMenu,
    MgModal,
    MgDialog,
    MgTable,
    MgDatetime,
    MgSelectTree,
    MgEasyTable,
    store,
    httpJs
}
